home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / motifpg2.zip / README < prev    next >
Text File  |  1992-08-18  |  6KB  |  194 lines

  1. This directory contains the source for the example programs described
  2. in O'Reilly and Associates' X Toolkit Intrinsics Programming Manual,
  3. Motif Edition (and a few not described there).  These examples require
  4. Motif 1.2 and the X11R5 version of Xt and the other X libraries.
  5.  
  6. Most of the files in the top level directory are application defaults 
  7. files for the examples in the subdirectories.  To run the programs using
  8. the application defaults files (in many cases necessary for the programs
  9. to operate properly), simply set the XAPPLRESDIR environment variable
  10. to point to this directory (or install these files in 
  11. /usr/lib/X11/app-defaults).  Note that the value of XAPPLRESDIR must 
  12. end in a /.
  13.  
  14. The example code is in subdirectories named after the chapter where
  15. the examples are described.
  16.  
  17. If you are getting this archive from UUNET, the source for the 
  18. xtetris game is in the xtetris subdirectory.  If you are getting
  19. this archive from the X11 source tape from MIT, then the source for 
  20. xtetris is in the directory contrib/games/xtetris.
  21.  
  22. Note that the Makefiles do not install the example
  23. programs.  The examples are intended to be run from this directory so 
  24. that they don't clutter up /usr/bin/X11/ because they are not generally
  25. useful as real programs (with the possible exception of xtetris).
  26.  
  27. The following lists what is demonstrated in each of the directories.
  28.  
  29. ch02 contains the following example programs:
  30.  
  31. xhello:        a simple hello world program using the Label widget
  32.  
  33. xgoodbye:    xhello with a callback on a PushButton widget
  34.  
  35. xsetstring:     demonstrates how to use XtVaSetValues and how to set
  36.         a compound string in the code.
  37.  
  38. xgetstring:     demonstrates how to use XtVaGetValues and how to get a 
  39.         compound string in the code.
  40.  
  41.  
  42. ch03 contains the following example programs:
  43.  
  44. xrowcolumn:    a simple XmRowColumn containing PushButtons
  45.  
  46. xform:        a simple XmForm containing PushButtons
  47.  
  48. xmainwindow:    an XmMainWindow, with a menu bar, a File menu containing 
  49.         quit, and a Help menu containing a help button that posts 
  50.         a dialog -- both menus have tear-off behavior enabled
  51.  
  52. Ex3-8:        example 3-8 from book -- passing a number to a callback 
  53.         through client_data
  54.  
  55. Ex3-9:        example 3-9 from book -- passing a structure to a callback 
  56.         through client_data
  57.  
  58.  
  59. ch04 contains the following example programs:
  60.  
  61. xbitmap1:    simplest bitmap editor, using BitmapEdit widget
  62.  
  63. xbitmap2:    add small pixmaps to xbitmap1, using XmDrawingArea
  64.  
  65. xbitmap3:    add small pixmaps to xbitmap1, using XmPrimitive
  66.  
  67. xbitmap4:    implement xbitmap1, not using BitmapEdit widget
  68.  
  69. xbitmap5:    both reads and writes standard bitmap files, using BitmapEdit
  70.  
  71. BitmapEdit.c:    source file for BitmapEdit widget, described in chapters 
  72.         6 and 7
  73.  
  74. BitmapEdiP.h:    private include file for BitmapEdit, described in Chapter 6
  75.  
  76. BitmapEdit.h:    public include file for BitmapEdit, described in Chapter 6
  77.  
  78.  
  79. ch05 contains the following example programs:
  80.  
  81. xcomstring:    demonstrates creating compound string segments and
  82.         modifying fonts in the middle of a compound string 
  83.  
  84. xuildemo:    a hello, world program written using uil
  85.  
  86.  
  87. ch08 contains the following examples programs:
  88.  
  89. xmotdbltst:    tests motion events and double clicks in the same 
  90.            translation table to show that this is erratic
  91.  
  92. xtryaccel:    adds accelerators to xbox1 so that 'q' and 'p' 
  93.            invoke actions from anywhere in the application -- note that
  94.            this example uses the Athena widgets because it does not 
  95.         work in Motif because Motif modifies translation and 
  96.            accelerator tables internally
  97.  
  98.  
  99. ch09 contains the following example programs:
  100.  
  101. xfileinput:    gets input from file using XtAppAddInput; invoke with 
  102.         filename command-line argument
  103.  
  104. xpipeinput:    gets input from pipe using XtAppAddInput; specify on 
  105.         command-line any program that prints characters to standard 
  106.         out (xpipeinput "cal 10 1989")
  107.  
  108. xstdin:        gets input from pipe from stdin
  109.  
  110. xworkproc:    uses a work procedure to create a popup widget using 
  111.         idle time
  112.  
  113.  
  114. ch10 contains the following example programs:
  115.  
  116. xpixmap.c:    invokes a resource converter from the application;
  117.         since the Motif converter CvtStringToPixmap is not 
  118.         application accessible, the program uses the Xmu
  119.         StringToBitmap converter
  120.  
  121. xfallback.c:    defines a set of fallback resources
  122.  
  123.  
  124. ch11 contains the following example programs: 
  125.  
  126. xicon:        an example of specifying an icon pixmap
  127.  
  128. xselectbit:    a simple version of xbitmap the provides selection
  129.         capabilities
  130.  
  131. BitmapEdit.c:    source file for a version of the BitmapEdit widget 
  132.         the implements selections 
  133.         (uses XmuConvertStandardSelection from the Xmu library)
  134.  
  135. BitmapEdiP.h:   private include file for BitmapEdit
  136.  
  137. BitmapEdit.h:   public include file for BitmapEdit
  138.  
  139. icon.bit:    an icon bitmap file used in xicon.c.
  140.  
  141.  
  142. ch12 contains the following example programs:
  143.  
  144. xscrollbox:    a simple version of xbitmap that tests ScrollBox
  145.  
  146. ScrollBox.c:    source file for a minimal composite widget that manages 
  147.         two scrollbars and a main window
  148.  
  149. ScrollBox.h:    public include file for ScrollBox
  150.  
  151. ScrollBoxP.h:    private include file for ScrollBox
  152.  
  153.  
  154. ch13 contains the following example programs:
  155.  
  156. xpopup:        a basic Motif popup menu without accelerators or mnemonics
  157.  
  158. xpopupcasc:    a Motif popup menu with a cascading submenu
  159.  
  160. xmenu1:        a simple spring-loaded popup menu using the Athena widgets
  161.  
  162. xmenu2:        a simple pulldown menu from an Athena command widget
  163.  
  164. xmenu3:        a simple pulldown menu using the Athena MenuButton widget
  165.  
  166. xmenu4:        a pulldown menu with a submenu, using the Athena widgets
  167.  
  168. xmenu5:        a spring-loaded popup menu with a submenu, using the
  169.         Athena widgets
  170.  
  171. xmenu6:        an attempt at a pulldown menu identical to xmenu2 except 
  172.         using XtCallbackExclusive with callbacks only and no 
  173.         actions -- doesn't work because XtCallbackExclusive calls 
  174.         XtPopup which can't pass the right parameters to _XtPopup
  175.          (even if you write your own callback it still won't work --
  176.         this type of menu must use the XtMenuPopup action)  -- 
  177.         fixed by XtPopupSpringLoaded
  178.  
  179. xmenu7:        a pulldown menu using the Athena SimpleMenu, MenuButton, 
  180.         and all three Sme gadgets
  181.  
  182. xdialog:    a dialog box using the Athena widgets that is popped up
  183.         with XtCallbackExclusive callback
  184.  
  185.  
  186. ch14 contains the following example programs:
  187.  
  188. xtwodisp:    an application with windows on two displays
  189.  
  190. xtwoapp:    an application that uses two application contexts and
  191.         two displays
  192.  
  193.  
  194.